# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Sam Burgos <santiago.burgos1089@gmail.com>

pkgname=lightdm-slick-greeter
pkgver=1.8.2
pkgrel=1
pkgdesc='A slick-looking LightDM greeter'
arch=('loong64' 'x86_64')
url="https://github.com/linuxmint/slick-greeter"
license=('GPL3')
depends=('cairo' 'freetype2' 'gtk3' 'libcanberra' 'libxext' 'lightdm' 'pixman'
         'python' 'xorg-server' 'xapp')
optdepends=('numlockx: enable numerical keypad on supported keyboard')
makedepends=('intltool' 'vala' 'gnome-common')
source=("${pkgname}-${pkgver}.tar.gz::$url/archive/${pkgver}.tar.gz")
sha512sums=('40fbe464b09a05e2b439baff18552ad50a0d88008d61aee93013287f167e669a0f645cbee0d7c0ca2463c7a7362b48f993b1377185c3406236cfea451de14191')
b2sums=('a141111cd29aa01f7ec3819d099b65386a451ae200f366bff21797427879c768d2e25a861749458bc564c096b7ce86e1622d05363b8d8dada1185d4dd0ba8077')

prepare() {
	cd slick-greeter-${pkgver}
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	cd slick-greeter-${pkgver}
	./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \
             --libexecdir=/usr/lib/lightdm
	make
}

package() {
	cd slick-greeter-${pkgver}
	make DESTDIR="${pkgdir}" install
	# adjust launcher name
	mv $pkgdir/usr/share/xgreeters/slick-greeter.desktop \
    $pkgdir/usr/share/xgreeters/lightdm-slick-greeter.desktop
}
